<?php

class League extends CActiveRecord
{
    public $id;

    public $name;

    public function tableName()
    {
        return 'leagues';
    }

    public function relations()
    {
        return array(
            'country' => array(self::BELONGS_TO, 'Country', 'country_id')
        );
    }

    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }
}